import 'package:flutter/material.dart';
import 'package:huobi/configs/app_style_config.dart';
import 'package:huobi/routers/app_routers.dart';
import 'package:huobi/routers/hb_router.dart';
import 'package:huobi/views/jk/jk_text.dart';

class LoginPage extends StatefulWidget {
  @override
  _LoginPageState createState() => _LoginPageState();
}

class _LoginPageState extends State<LoginPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: AppStyleConfig.themColor,
      appBar: AppBar(
        elevation: 0.0,
        leading: InkWell(
          onTap: () => Navigator.pop(context),
          child: Center(
            child: JKText(
              data: "取消",
            ),
          ),
        ),
      ),
      body: Container(
        child: Column(
          children: [
            // header
            buildHeaderWidget(),
            // from
            // share
            // bottom
            FlatButton(onPressed: (){
              HBRouter.navigateTo(context, AppRouters.registerPage);
            }, child: JKText(data: "注册",color: Colors.blue, fontSize: 18, weight: FontWeight.bold,),),
          ],
        ),
      ),
    );
  }

  buildHeaderWidget() {
    return Container(
      child: Column(
        children: [
          Image.network(
            "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic4.zhimg.com%2Fv2-853525ca300e19dcd3a46e2ea3b73b20_1200x500.jpg&refer=http%3A%2F%2Fpic4.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1618328988&t=c23d68ebac94753426481957ddcb4b8a",
            color: Colors.white,
            height: 150,
            fit: BoxFit.fitHeight,
          ),
          // JKText(data: "登录火币",)
        ],
      ),
    );
  }
}
